package club.adger.dao;

import club.adger.entity.Employees;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: Adger
 * @Date: 2020/07/03/16:21
 * 这是一个很容易忽视的点，记住：接口名与Mybatis的映射文件名一定要一模一样。
 */
public interface EmployeesMapper {
    int deleteByPrimaryKey(Integer empId);

    int insert(Employees record);

    int insertSelective(Employees record);

    Employees selectByPrimaryKey(Integer empId);

    int updateByPrimaryKeySelective(Employees record);

    int updateByPrimaryKey(Employees record);

    /**
     * 这是用户登录的持久层接口方法
     * @param password
     * @param userName
     * @return
     */
    /*@Select("select * from employees where emp_name=#{userName} and emp_pwd=#{password}")*/
    List<Employees> login(@Param("userName") String userName, @Param("password") String password);
}